package com.heima.sjms.适配器adapter;

interface Target {
    void request();
}

//需要被适配的类
public class Adaptee {
    public void specificRequest() {
        System.out.println("调用了被适配者的特殊请求方法");
    }
}
//适配器类
class Adapter implements Target {
    private Adaptee adaptee;

    public Adapter(Adaptee adaptee) {
        this.adaptee = adaptee;
    }

    @Override
    public void request() {
        adaptee.specificRequest();
    }
}